package y23.May;

import java.util.Scanner;

public class LongitudeAndLatitude {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = 1;
        while(i<100){
            System.out.println("第"+i+"次");
            System.out.println("请输入时间");
            int h = sc.nextInt();
            double wd = 36.5/180*Math.PI;//纬度
            double cw = -23.5/180*Math.PI;
            double dfs;//地方时
            dfs = (12 - h)*Math.PI/12 + 15/180*Math.PI;
            double elevatingAngle;//太阳高度角
            double directionAngle;//太阳方向角
            elevatingAngle = Math.sin(cw)*Math.sin(wd)+Math.cos(dfs)*Math.cos(cw)*Math.cos(wd);//求得高度角的sin值
            directionAngle = (elevatingAngle*Math.sin(wd)-Math.sin(cw))/ (Math.cos(Math.asin(elevatingAngle))*Math.cos(wd));//求得方向角的cos值
            double Andle = 180/Math.PI;
            System.out.println(dfs*Andle);
            System.out.println(cw*Andle);
            System.out.println(wd*Andle);
            System.out.println(Math.asin(elevatingAngle)*Andle);
            System.out.println(Math.acos(directionAngle)*Andle);

        }
    }
}
